package com.ruoyi.controller;


import com.ruoyi.service.DubboDemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @DubboReference
    private DubboDemoService dubboDemoService;

    @GetMapping("/test")
    public Map<String,Object> test(){
        Map<String, Object> map = new HashMap<>(2);

        String s = dubboDemoService.sayHello("微服务 SpringBoot整合Nacos+Dubbo");

//        map.put("list",list);
        map.put("s",s);
        return map;
    }
}
